﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Face_Recognition.Haar
{
    public static class HaarUtilities
    {
        public static bool IsRectangleEqual(this System.Drawing.Rectangle objA, System.Drawing.Rectangle objB, int threshold)
        {
            return (Math.Abs(objA.X - objB.X) < threshold) &&
                   (Math.Abs(objA.Y - objB.Y) < threshold) &&
                   (Math.Abs(objA.Width - objB.Width) < threshold) &&
                   (Math.Abs(objA.Height - objB.Height) < threshold);
        }
    }
}
